import config from "../../../config/index.js";
import http from "../../../utils/request.js";

export default {
    addDataSource: {
        url: `${config.API_URL}/platform/tool/datasource/add`,
        name: "新增数据源",
        post: function (platformDataSourceAddVo) {
            return http.post(this.url, platformDataSourceAddVo);
        }
    },
    delDataSources: {
        url: `${config.API_URL}/platform/tool/datasource/del`,
        name: "多选级联删除数据源",
        delete: function (sourceIdList) {
            return http.delete(this.url, sourceIdList);
        }
    },
    editDataSource: {
        url: `${config.API_URL}/platform/tool/datasource/edit`,
        name: "修改数据源信息",
        put: function (platformDataSourceEditVo) {
            return http.put(this.url, platformDataSourceEditVo);
        }
    },
    getDataSourceById: {
        url: `${config.API_URL}/platform/tool/datasource/info`,
        name: "根据ID获取数据源详情",
        get: function (sourceId) {
            return http.get(this.url + "/" + sourceId);
        }
    },
    pageListDataSource: {
        url: `${config.API_URL}/platform/tool/datasource/pageList`,
        name: "分页查询数据源列表",
        get: function (platformDataSourceQueryVo) {
            return http.get(this.url, platformDataSourceQueryVo);
        }
    }
}
